﻿@using Carer.Data
@using Carer.App
@{
    ViewBag.Title = "费用管理";
    Layout = "~/Views/Shared/_Layout.cshtml";

    var crewTypes = ViewBag.CrewTypes as IList<CrewType>;
    if (crewTypes == null)
    {
        crewTypes = new List<CrewType>();
    }

    var categories = ViewBag.Categories as IList<Category>;
    if (categories == null)
    {
        categories = new List<Category>();
    }
}
<div id="list" class="view">
    <div class="query">
        <ul class="tool">
            <li><button class="add btn btn-default"><span class="add"></span>增 加</button></li>
            <li><button class="delete btn btn-default"><span class="delete"></span> 删 除</button></li>

        </ul>

        <form action="">
            <ul>
                <li><label>人员姓名</label><input name="CrewName" type="text" class="form-control" /></li>
                <li><label>开始日期</label><input name="Start" type="text" class="date form-control" /></li>
                <li><label>结束日期</label><input name="End" type="text" class="date form-control" /></li>
                <li><button class="query btn btn-primary"><i class="fa fa-search fa-lg"></i> 查 询</button></li>
            </ul>
        </form>
    </div>

    <div class="list">
        <table class="list">
            <thead>
                <tr>
                    <th><input class="selall" type="checkbox" /></th>
                    <th>人员</th>
                    <th>日期</th>
                    <th>项目</th>
                    <th>调整金额</th>
                    <th>备注</th>
                    <th class="action">操作</th>
                </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div id="lpager" class="jpager"></div>
</div>
<div id="edit" class="view edit">
    <div class="title"><span>费用信息</span></div>
    <form id="editForm" action="">
        <input class="Id" name="Id" type="hidden" />
        <table>
            <tr>
                <td class="title"><font color="red">*</font> 服务人员：</td>
                <td class="content">
                    <input class="CrewId" name="CrewId" type="hidden" />
                    <div class="input-group">
                        <input class="CrewName form-control" name="CrewName" type="text" readonly="readonly" />
                        <span class="input-group-btn">
                            <button id="CrewBrowser" class="btn btn-default"><i class="fa fa-lg fa-search"></i></button>
                        </span>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="title"><font color="red">*</font> 日期：</td>
                <td class="content"><input name="Date" type="text" class="Date date form-control" /></td>
            </tr>
            <tr>
                <td class="title">项目：</td>
                <td class="content"><input name="Item" type="text" class="Item form-control" /></td>
            </tr>
            <tr>
                <td class="title"><font color="red">*</font> 金额：</td>
                <td class="content"><input name="Value" type="text" class="Value form-control" /></td>
            </tr>
            <tr>
                <td class="title">备注：</td>
                <td class="content"><input name="Note" type="text" class="Note form-control" /></td>
            </tr>
        </table>
        <p class="submit">
            <button class="save btn btn-success" type="submit"><i class="fa fa-save fa-lg"></i> 保 存</button>
            <button class="cancel btn btn-danger"><i class="fa fa-close fa-lg"></i> 取 消</button>
        </p>
    </form>

</div>

<div id="crew" class="dialog" title="选择人员">
    <div class="query">
        <form action="">
            <ul>
                <li><label>姓名</label><input name="Name" type="text" class="form-control" /></li>
                <li>
                    <label>性质</label>
                    <select name="Type" class="form-control">
                        <option value="">所有</option>
                        @foreach (var item in crewTypes)
                        {
                            <option value="@item.Name">@item.Name</option>
                        }
                    </select>
                </li>
                <li>
                    <label>状态</label>
                    <select name="Status" class="form-control">
                        <option value="">所有</option>
                        <option value="在职">在职</option>
                        <option value="离职">离职</option>
                    </select>
                </li>
                <li>
                    <label>技能</label>
                    <select name="Skill" class="form-control">
                        <option value="">所有</option>
                        @foreach (var item in categories)
                        {
                            <option value="@item.Name">@item.Name</option>
                        }
                    </select>
                </li>
                <li><button class="query btn btn-primary"><i class="fa fa-search fa-lg"></i> 查 询</button></li>
            </ul>
        </form>
    </div>
    <div class="list">
        <table class="list">
            <thead>
                <tr>
                    <th>姓名</th>
                    <th>性质</th>
                    <th>技能</th>
                    <th>状态</th>
                    <th>身份证</th>
                    <th>暂住证</th>
                    <th>健康证</th>
                    <th>上岗证</th>
                    <th>电话</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div id="wpager" class="jpager"></div>
</div>
@section Scripts {
    @Scripts.Render("~/Content/Common/util.js?v=" + MvcApplication.TimeStamp)
    @Scripts.Render("~/Content/Business/bonus.js?v=" + MvcApplication.TimeStamp)
}